# Copyright 2018- The Pixie Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

load("//bazel:proto_compile.bzl", "pl_cc_proto_library", "pl_go_proto_library", "pl_proto_library")

package(default_visibility = ["//src/stirling:__subpackages__"])

pl_proto_library(
    name = "greet_pl_proto",
    srcs = ["greet.proto"],
)

pl_go_proto_library(
    name = "greet_pl_go_proto",
    importpath = "px.dev/pixie/src/stirling/source_connectors/socket_tracer/protocols/http2/testing/proto",
    proto = ":greet_pl_proto",
)

pl_cc_proto_library(
    name = "greet_pl_cc_proto",
    proto = ":greet_pl_proto",
    deps = [
        # This proto defines a gRPC service, so it has to include gRPC dependency.
        "@com_github_grpc_grpc//:grpc++",
    ],
)

pl_proto_library(
    name = "multi_fields_pl_proto",
    srcs = ["multi_fields.proto"],
)

pl_cc_proto_library(
    name = "multi_fields_pl_cc_proto",
    proto = ":multi_fields_pl_proto",
)

filegroup(
    name = "proto_files",
    srcs = glob([
        "*.proto",
        "*.pb.go",
    ]),
)
